package com.beyond.trace.domain.dto.warn.device;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName: MoistureDetail
 * @author: z越
 * @date: 2023/2/27  14:59
 * @description 新型墒情数据详情
 */
@Data
public class MoistureDetail implements Serializable {

    private static final long serialVersionUID = 1L;
    private Integer id;

    /**
     * 设备编号
     */
    private String imei;

    /**
     * 层数
     */
    private Integer tier;

    /**
     * 温度
     */
    private Double temperature;

    private Double temperature1;

    private Double temperature2;

    private Double temperature3;

    private Double temperature4;

    private Double temperature5;

    /**
     * 湿度
     */
    private Double humidity;

    private Double humidity1;

    private Double humidity2;

    private Double humidity3;

    private Double humidity4;

    private Double humidity5;

    /**
     * ec
     */
    private Double ec;

    private Double ec1;

    private Double ec2;

    private Double ec3;

    private Double ec4;

    private Double ec5;

    /**
     * ph
     */
    private Double ph;

    /**
     * 氮
     */
    private Double nit;

    /**
     * 磷
     */
    private Double phos;

    /**
     * 钾
     */
    private Double kal;

    /**
     * 数据采集时间
     */
    private Date upTime;

    /**
     * 创建时间
     */
    private Date createAt;

    public MoistureDetail(JSONObject object){
        this.temperature = object.getDouble("temperature");
        this.humidity = object.getDouble("humidity");
        this.ph = object.getDouble("ph");
    }

}
